import { idStore } from '@/stores/goodsId'
import { useRouter } from 'vue-router'

// 跳转到详情页
export const useToDetail = () => {
    const id = idStore()
    const router = useRouter()
    const toDetail = (item: any) => {
        id.saveGoodsId(item.id)

        router.push('/detail')
    }
    return { toDetail }
}
